

import request from '@/router/axios'

export function fetchList(query) {
  return request({
    url: '/stm/swsttickethand/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/stm/swsttickethand',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/stm/swsttickethand/' + id,
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: '/stm/swsttickethand/' + id,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/stm/swsttickethand',
    method: 'put',
    data: obj
  })
}

export function submit(obj) {
  return request({
    url: '/stm/swsttickethand/submit',
    method: 'post',
    data: obj
  })
}

export function getDetailObj(id){
  return request({
    url: '/stm/swsttickethand/getDetailById/' + id,
    method: 'get'
  })
}

export function batchDelete(obj) {
  return request({
    url: '/stm/swsttickethand/batchDelete',
    method: 'post',
    data: obj
  })
}

export function complain(obj){
  return request({
    url: '/stm/swsttickethand/complain',
    method: 'post',
    data: obj
  })
}

export function exportExcel(query){
  return request({
    url: '/stm/swsttickethand/export',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
